
class CarModel {

  ///数据库 id 用于操作
  final int id;
  ///任务状态  -1=不可用 2 || 5 =空闲中， 3=任务中	4 调配中
  final int status;
  ///车辆编号	
  final String car_no;
  ///车辆id	
  final String car_id;
  ///车辆品牌 muyi=木蚁  neolix=新石器
  final String brand;
  ///派单方式  1=自动派单， 2=手动派单	
  final int mode;
  ///-1=不可执行 1=可执行	
  final int car_status;
  ///-1=不通新， 1=通信
  final int signal_status;

  CarModel(
    this.id,
    this.status,
    this.car_no,
    this.car_id,
    this.brand,
    this.mode,
    this.car_status,
    this.signal_status
    );

  factory CarModel.fromMap(Map<String, dynamic> json) => CarModel(
        json['id'],
        json['status'],
        json['car_no'],
        json['car_id'],
        json['brand'],
        json['mode'],
        json['car_status'],
        json['signal_status'],
        );

  // CarModel.fromJsonMap(Map<String, dynamic> map):
  //       id = map['id'] as int,
  //       status = map['status'] as int,
  //       car_no = map['car_no'] as String,
  //       car_id = map['car_id'] as String,
  //       brand = map['brand'] as String,
  //       mode = map['mode'] as int,
  //       car_status = map['car_status'] as int,
  //       signal_status = map['signal_status'] as int;

}